$(document).ready(function() {
	/**
	 * 返回字典列表
	 */
	$('#btn_back').click(function() {
	    location.href = '/Dict/dict'
	})


	/**
	 * 处理批量添加
	 */
	$('#btn_doBatchAddDict').click(function() {
    	$.ajax({
            url: '/Dict/doBatchAddDict',
            type: 'post',
            async: true, //default: true
            data: $('#form_batchAddDict').serialize(),
            dataType: 'json', // default: Intelligent Guess (xml, json, script, or html)
            success: function (data, textStatus, jqXHR) {
            	if (data.status == 200) {
            		location.href = '/Dict/dict'
            	} else if (data.status == 410401) {
            		$('#tip_batchAddDict').html(data.msg)
            		$('#type' + data.i).css('color', 'red')
            		$('#k' + data.i).css('color', 'red')
            	}
            }
        })
	})


})